<?php
/*
 * 推荐页面, 默认页面, 首页
 * @package    auto
 * @author     Mark
 * @copyright  Copyright (c) 2013 ixdcw team
 * @version    $Id: 800e95dc467efb65d101eae5765e04195e2d1ac4 $
 */

defined('IN_IXDCW') or exit('Access Denied');
require DT_CORE.'/'.$module.'/common.inc.php';

$table = Table::name(Table::NAME_AUTO_INSURANCE);

$do = new AutoInsuranceModule;



if($submit){

	login();
	$insuranceCategory = '交强险,';
	if($checkbox) {
		$insuranceCategory .= implode(',',$checkbox);
	}else{
		Prompt::message('至少选择一个险种','goback');
	}
	if($do->pass($post)){
		$post['insurance_category'] = $insuranceCategory;
		$post['user_id'] = $_userid;
		$post['user_name'] = $_username;
		$post['add_time']  = time();
		if($post['remark']=='例如：您上年度的车险理赔情况，以及是否有汽车事故情况') {
			$post['remark'] = '无';
		}

		$sql = Sql::insert($table,$post);
		$db->query($sql);
		Prompt::message('您已报名成功！我们的客服将尽快与您联系！','?','8');
	}else{
		Prompt::message($do->getErrmsg());
	}

	$seo_file = 'index';
	include DT_INC.'/seo.inc.php';
}
$buy_time   = '';
$close_time = '';


include template('insurance', $module);



